package com.rimi.service.impl;

import com.rimi.bean.Role;
import com.rimi.dao.RoleDao;
import com.rimi.dao.impl.RoleDaoImpl;
import com.rimi.service.RoleService;

import java.util.List;

/**
 * @author chengliang
 */
public class RoleServiceImpl implements RoleService {

    private RoleDao roleDao = new RoleDaoImpl();

    @Override
    public Role getRoleByRoleId(int roleId) {
        if(roleId <= 0){
            return null;
        }
        return roleDao.selectRoleById(roleId);
    }

    @Override
    public List<Role> findRoleList() {
        return roleDao.selectRoleAll();
    }


}
